/*************************************************************************
 *
 * $Id: serial_hnds.h 119 2007-01-22 17:35:57Z Ales $
 * 
 *************************************************************************/         

#ifndef _SERIAL_HNDS_H
#define _SERIAL_HNDS_H

extern void DESC_W_Handler(PACKET_HEADER *ph, char *data, unsigned char length);
extern void DESC_R_Handler(PACKET_HEADER *ph, char *data, unsigned char length);
extern void STDATA_W_Handler(PACKET_HEADER *ph, char *data, unsigned char length);
extern void RWDATA_W_Handler(PACKET_HEADER *ph, char *data, unsigned char length);
extern void RWDATA_R_Handler(PACKET_HEADER *ph, char *data, unsigned char length);
extern void INIT_W_Handler(PACKET_HEADER *ph, char *data, unsigned char length);

const SERIAL_HANDLER serial_handler[] PROGMEM = {
    /*  CMD                 STATE_FUNC             */
    {   CMD_DESC_WRITE,     DESC_W_Handler          },
    {   CMD_DESC_READ,      DESC_R_Handler          },
    {   CMD_STDATA_WRITE,   STDATA_W_Handler        },
    {   CMD_RWDATA_WRITE,   RWDATA_W_Handler        },
    {   CMD_RWDATA_READ,    RWDATA_R_Handler        },
    {   CMD_INIT_WRITE,     INIT_W_Handler          },
    {   0,                  0,                      }
};

#endif
